Conventionally, there has been known a game system which includes two direction input units (such as sticks) and are directed to input for moving a character in a virtual space by one direction input unit and to input for changing a position of a virtual camera relative to the character (a direction to shoot the character) by the other direction input unit.
There has been further known a technique for moving two objects by two direction input units and automatically changing a position of a virtual camera relative to the two objects (a direction to shoot the two characters) depending on a positional relationship between the two objects (JP 2013-85663 A, for example).
In the conventional game system, however, if only one direction input unit can be used for one character, the character cannot be moved and a position of the virtual camera relative to the character cannot be changed.
An object of the present disclosure is to provide a game system capable of moving a character and moving a virtual camera even by use of one direction input unit, and a game program, and a game processing device.
A game system according to an aspect includes: a first direction input unit for inputting a first direction relating to a moving direction of a character in a virtual space; an operation input unit for inputting an operation relating to an operation of a virtual camera in the virtual space; and a control unit which moves the character in the virtual space in the input first direction, wherein when the operation is not input but the first direction is input, the control unit moves the virtual camera according to a first control method, and hen the first direction and the operation are input at the same time, the control unit moves the virtual camera according to a second control method based on the input first direction.
With the configuration, a method for controlling movement of the virtual camera is changed depending on whether the first direction and the operation are input at the same time, and thus one direction input unit as the first direction input unit enables the character to be moved and the virtual camera to be arbitrarily moved.
In the game system, the control unit may move the virtual camera to follow movement of the character in the first control method, and move the virtual camera to follow movement of the character in a direction corresponding to the input first direction in the second control method.
With the configuration, one direction input unit as the first direction input unit enables the character to be moved and a position of the virtual camera to be arbitrarily operated by inputting the first direction while inputting the operation.
In the game system, the control unit may move the virtual camera toward the character in a direction corresponding to a predetermined direction component of the input first direction in the second control method.
With the configuration, the virtual camera can be prevented from moving according to movement of the character when the character is moved in a direction other than a predetermined direction.
The game system may further include a stick capable of being tilted and pressed by a user operation, wherein the first direction input unit may be a tilt detection unit which detects tilt of the stick as the input first direction corresponding to the tilt direction, and the operation input unit may be a press detection unit which detects press of the stick by the user as the input operation.
With the configuration, the first direction and the operation can be input by different operations (tilt and press) of one stick.
The game system may further include: a first controller provided with the first direction input unit and the operation input unit; and a second controller provided with a second direction input unit for inputting a second direction for a direction in the virtual camera moves in the virtual space, wherein the control unit further performs mode selection processing of selecting either a single-player mode in which one player operates the first controller and the second controller or a two-player mode in which one player operates the first controller and the other player operates the second controller, may move the virtual camera on the basis of the input second direction in the single-player mode, and may move the virtual camera according to the first control method when the operation is not input but the first direction is input, and move the virtual camera according to the second control method based on the input first direction when the first direction and the operation are input at the same time in the two-player mode.
With the configuration, the mode (single-player mode) in which one player uses the two controllers or the mode (two-player mode) in which each of two players uses one controller can be selected, and a method for controlling movement of the virtual camera is changed depending on whether the first direction and the operation are input at the same time in the two-player mode in which one player can use only one controller, and thus one controller enables the character to be moved and the virtual camera to be arbitrarily moved.
In the game system, the control unit may employ a different correspondence between the input first direction and the moving direction of the character in the virtual space between the single-player mode and the two-player mode.
With the configuration, a direction to be held by the controllers may be different between the mode (single-player mode) in which one player uses the two controllers and the mode (two-player mode) in which each of two players uses one controller.
A game system according to another aspect which moves a character in a virtual space and generates an image based on a virtual camera set in the virtual space, the game system including: a stick capable of being tilted and pressed; and a control unit which moves the character in the virtual space depending on the tilt when the stick is tilted but not pressed, and moves the character in the virtual space depending on the tilt and moves the virtual camera relative to the character depending on tilt when the stick is tilted and pressed.
With the configuration, the character is simply moved when the stick is not pressed but tilted, and the character can be moved when the stick is tilted while pressed, and the virtual camera can be instructed to move in response to the tilt of the stick. Thus, there is no need to prepare a different stick for instructing to move the virtual camera from the stick for instructing to move the character.
A non-transitory storage medium having stored therein a game program according to one aspect causes a computer of a game system provided with a stick capable of being tilted and pressed, a tilt detection unit for detecting the tilt, and a press detection unit for detecting the press to move a character in a virtual space and to generate an image based on a virtual camera set in the virtual space, wherein the game program further causes the computer to move the character in the virtual space depending on the tilt when the tilt detection unit detects the tilt and the press detection unit does not detect the press, and to move the character in the virtual space depending on the tilt and to move the virtual camera relative to the character depending on the tilt when the tilt detection unit detects the tilt and the press detection unit detects the press.
Also with the configuration, the character can be simply moved when the stick is not pressed but tilted, and the character can be moved when the stick is tilted while pressed, and the virtual camera can be instructed to move in response to the tilt of the stick. Thus, there is no need to prepare a different stick for instructing to move the virtual camera from the stick for instructing to move the character.
The game program may further cause the computer to move the virtual camera to follow movement of the character when the tilt detection unit detects the tilt and the press detection unit does not detect the press, and to move the virtual camera to follow movement of the character in a direction corresponding to the tilt when the tilt detection unit detects the tilt and the press detection unit detects the press.
With the configuration, the character can be moved by tilting the stick, and a position of the virtual camera can be operation by tilting the stick while pressing it.
The game program may further cause the computer to move the virtual camera toward the character in a direction corresponding to a predetermined direction component of the tilt when the tilt detection unit detects the tilt and the press detection unit detects the press.
With the configuration, the virtual camera can be prevented from moving along with movement of the character when the character is moved in a direction other than a predetermined direction.
In the game program, the game system may include a first controller provided with the stick, the tilt detection unit and the press detection unit, and a second controller provided with the stick and the tilt detection unit, and the game program may further cause the computer to perform mode selection processing of selecting either a single-player mode in which one player operates the first controller and the second controller or a two-player mode in which one player operates the first controller and the other player operates the second controller, to move the virtual camera on the basis of tilt of the stick in the second controller in the single-player mode, and to move a character in a virtual space depending on the tilt when the press detection unit in the first controller does not detect the press but the tilt detection unit in the first controller detects the tilt in the two-player mode, and to move the character in the virtual space depending on the tilt detected by the tilt detection unit in the first controller and to move the virtual camera relative to the character depending on the tilt detected by the tilt detection unit in the first controller when the press detection unit in the first controller detects the press and the tilt detection unit in the first controller detects the tilt at the same time.
With the configuration, the mode (single-player mode) in which one player uses the two controllers or the mode (two-player mode) in which each of two players uses one controller can be selected, and a method for controlling movement of the virtual camera is changed depending on whether the stick is tilted and pressed at the same time in the two-player mode in which one player can use only one controller, and thus one controller enables the character and the virtual camera to be moved.
In the game program, the computer may employ a different correspondence between the input first direction and a direction in which the character moves in the virtual space between the single-player mode and the two-player mode.
With the configuration, a direction to be held by the controllers may be different between the mode (single-player mode) in which one player uses the two controllers and the mode (two-player mode) in which each of two players uses one controller.
A game processing device according to one aspect includes a first direction input unit for receiving the entry of a first direction relating to a moving direction of a character in a virtual space, an operation input unit for receiving the entry of an operation relating to an operation of a virtual camera in the virtual space, and a control unit for moving the virtual camera according to a first control method when the entry of the operation is not received but the entry of the first direction is received, and moving the virtual camera according to a second control method based on the input first direction when the entry of the first direction and the entry of the operation are received at the same time.
Also with the configuration, a method for controlling movement of the virtual camera is changed depending on whether the first direction and the operation are input at the same time, and thus one direction input unit as the first direction input unit enables the character to be moved and the virtual camera to be arbitrarily moved.
The foregoing and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.